package com.wanggsx.library.base.app.needextends;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;

import com.wanggsx.library.util.MethodsNetwork;

/**
 * Created by wanggsx on 15/10/22.
 * 本父类实现了接收网络状态变化的广播，并刷新网络状态
 */
public class SuperAppReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
            MethodsNetwork.refreshAPNType(context,null);
        }
    }
}
